const Base_url = "https://diandi12.cn"
// const Base_url = "http://127.0.0.1:5000"

export function request(config={}){
	let {
		url,
		data = {},
		method = "GET",
		header = {}
		} = config;
	url = Base_url + url;
	return new Promise((resolve, reject) => {
		uni.request({
			url,
			data,
			method,
			header,
			success:res=> {
				resolve(res.data);
			},
			fail: err => {
				reject(err);
			}
		})
	})
}